﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FLMScan.OpenCV
{
    class OpenCVConstants
    {
        public const uint IPL_DEPTH_8U = 8;
        public const uint IPL_DEPTH_32F = 32;
        public const int CV_BGR2GRAY = 6;

        public const int CV_CAP_PROP_POS_MSEC = 0;
        public const int CV_CAP_PROP_POS_FRAMES = 1;
        public const int CV_CAP_PROP_POS_AVI_RATIO = 2;
        public const int CV_CAP_PROP_FRAME_WIDTH = 3;
        public const int CV_CAP_PROP_FRAME_HEIGHT = 4;
        public const int CV_CAP_PROP_FPS = 5;
        public const int CV_CAP_PROP_FOURCC = 6;
        public const int CV_CAP_PROP_FRAME_COUNT = 7;
        public const int CV_CAP_PROP_FORMAT = 8;
        public const int CV_CAP_PROP_MODE = 9;
        public const int CV_CAP_PROP_BRIGHTNESS = 10;
        public const int CV_CAP_PROP_CONTRAST = 11;
        public const int CV_CAP_PROP_SATURATION = 12;
        public const int CV_CAP_PROP_HUE = 13;
        public const int CV_CAP_PROP_GAIN = 14;
        public const int CV_CAP_PROP_CONVERT_RGB = 15;        

        public const int CV_CN_SHIFT = 3;
        public const int CV_64F = 6;
        public const int CV_32F = 5;
        public const int CV_32S = 4;
        public static int CV_64FC1 = CV_MAKETYPE(CV_64F, 1);
        public static int CV_64FC2 = CV_MAKETYPE(CV_64F, 2);
        public static int CV_32FC1 = CV_MAKETYPE(CV_32F, 1);
        public static int CV_32FC2 = CV_MAKETYPE(CV_32F, 2);
        public static int CV_32SC1 = CV_MAKETYPE(CV_32S, 1);

        public const int CV_SVD = 1;
        public const int CV_CALIB_USE_INTRINSIC_GUESS = 1;
        public const int CV_CALIB_FIX_ASPECT_RATIO = 2;
        public const int CV_CALIB_FIX_PRINCIPAL_POINT = 4;
        public const int CV_CALIB_ZERO_TANGENT_DIST = 8;

        public const int CV_TERMCRIT_ITER = 1;

        private static int CV_MAKETYPE(int depth, int cn)
        {
            return ((depth) + (((cn) - 1) << OpenCVConstants.CV_CN_SHIFT));
        }
    }
}
